package cn.fengshenghospital.service.impl;

import cn.fengshenghospital.entity.Lead;
import cn.fengshenghospital.entity.Section;
import cn.fengshenghospital.mapper.SectionMapper;
import cn.fengshenghospital.service.SectionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service("sectionService")
public class SectionServiceImpl implements SectionService {
    @Autowired
    private SectionMapper sectionMapper;

    @Override
    public List<Section> queryAllSection() {
        return sectionMapper.queryAllSection(0);
    }

    @Override
    public Section querySectionInfoBySid(int id) {
        return sectionMapper.querySectionInfoBySid(id);
    }

    @Override
    public List<Section> querySectionByParentId(int parentId) throws Exception {
        return sectionMapper.queryAllSection(parentId);
    }
}
